<!doctype html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,Chrome=1"/>
    <meta http-equiv="X-UA-Compatible" content="IE=9"/>
    <link rel="stylesheet" href="../../../lib/layui/css/layui.css">
    <link rel="stylesheet" href="../../static/css/common.css">
    <link rel="stylesheet" href="../../static/css/settings.css">
    <title>监测器设置</title>
</head>
<body>
<!--头部-->
<!--<header class="tophead" id="headerWrap"></header>-->
<!--主体-->
<div class="mainbody">
    <h3>监测器设置</h3>
    <!--表格-->
    <div class="tables">
        <table lay-filter="setMonitorsTable" class="settingTable" lay-data="{id: 'monitorsInfo'}"></table>
    </div>
</div>

<!--新增按钮-->
<script type="text/html" id="toolbarMonitors">
    <div class="layui-btn-container">
        <button type="button" class="layui-btn layui-btn-normal layui-btn-sm" lay-event="addMonitors">新增</button>
    </div>
</script>
<!--新增弹框-->
<script type="text/html" id="newAdd">
    <div class="options">
        <form class="layui-form addInfos" lay-filter="AddForm" action="#">
            <div class="infowrap">
                <input type="hidden" class="layui-input" name="monitorId" readonly>
                <div class="layui-form-item">
                    <label class="layui-form-label">监测器类型</label>
                    <div class="layui-input-inline">
                        <input type="radio" name="gauge" value="1" title="小量程" checked>
                        <input type="radio" name="gauge" value="2" title="大量程">
                    </div>
                </div>
                <div class="layui-form-item">
                    <div class="layui-inline">
                        <label class="layui-form-label">量程范围</label>
                        <div class="layui-input-inline" style="width: 100px;">
                            <input type="text" name="valueFrom" value="0" placeholder="起" autocomplete="off" class="layui-input">
                        </div>
                        <div class="layui-form-mid">-</div>
                        <div class="layui-input-inline" style="width: 100px;">
                            <input type="text" name="valueTo" value="200" placeholder="止" autocomplete="off" class="layui-input">
                        </div>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">所属转换器</label>
                    <div class="layui-input-inline">
                        <select class="layui-input layui-bg-blue converter" name="converterId"></select>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">位序</label>
                    <div class="layui-input-inline">
                        <input type="text" class="layui-input" name="bitSn" value="1">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">补偿值</label>
                    <div class="layui-input-inline">
                        <input type="text" class="layui-input" name="fixBase" value="0">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">输入电流范围</label>
                    <div class="layui-input-inline" style="width: 100px;">
                        <input type="text" name="inputFrom" value="4000" placeholder="起" autocomplete="off" class="layui-input">
                    </div>
                    <div class="layui-form-mid">-</div>
                    <div class="layui-input-inline" style="width: 100px;">
                        <input type="text" name="inputTo" value="20000" placeholder="止" autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item">
                    <div class="fr">
                        <button class="layui-btn layui-btn-sm submitBtn" lay-submit lay-filter="AddForm">确定</button>
                        <button type="cancel" class="layui-btn layui-btn-sm layui-btn-primary">取消</button>
                    </div>
                </div>
            </div>
        </form>
    </div>
</script>
<!--行操作-->
<script type="text/html" id="rowOperate">
    <div class=" layui-btn-group">
        <a class="layui-btn layui-btn-xs" lay-event="edit">编辑</a>
        <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</a>
    </div>
</script>
<!--行编辑弹窗-->
<script type="text/html" id="rowEdit">
    <div class="options">
        <form class="layui-form editInfos" lay-filter="rowEditForm" action="#">
            <div class="infowrap">
                <input type="hidden" class="layui-input" name="monitorId" readonly>
                <div class="layui-form-item">
                    <div class="layui-inline">
                        <label class="layui-form-label">量程范围</label>
                        <div class="layui-input-inline" style="width: 100px;">
                            <input type="text" name="valueFrom" placeholder="起" autocomplete="off" class="layui-input">
                        </div>
                        <div class="layui-form-mid">-</div>
                        <div class="layui-input-inline" style="width: 100px;">
                            <input type="text" name="valueTo" placeholder="止" autocomplete="off" class="layui-input">
                        </div>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">所属转换器</label>
                    <div class="layui-input-inline">
                        <select class="layui-input layui-bg-blue converter" name="converterId"></select>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">位序</label>
                    <div class="layui-input-inline">
                        <input type="text" class="layui-input" name="bitSn">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">补偿值</label>
                    <div class="layui-input-inline">
                        <input type="text" class="layui-input" name="fixBase">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">输入电流范围</label>
                    <div class="layui-input-inline" style="width: 100px;">
                        <input type="text" name="inputFrom" placeholder="起" autocomplete="off" class="layui-input">
                    </div>
                    <div class="layui-form-mid">-</div>
                    <div class="layui-input-inline" style="width: 100px;">
                        <input type="text" name="inputTo" placeholder="止" autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item">
                    <div class="fr">
                        <button class="layui-btn layui-btn-sm" lay-submit lay-filter="rowEditForm">确定</button>
                        <button type="cancel" class="layui-btn layui-btn-sm layui-btn-primary">取消</button>
                    </div>
                </div>
            </div>
        </form>
    </div>
</script>
<!--转换器模板-->
<script type="text/html" id="converter-tpl">
    <option value="0">请选择</option>
    {{each data}}
    <option value="{{$value.converterId}}">{{$value.converterAddr}}</option>
    {{/each}}
</script>
</body>
</html>
<script src="../../../lib/layui/layui.js"></script>
<script src="../../static/js/common.js"></script>
<script src="../../static/js/file/monitors-setting.js"></script>
